package com.eastfair.pay.dto;

import com.eastfair.common.dto.OrderPaymentPlan;
import com.eastfair.pay.enumeration.TransactionOrderOrderStatusEnum;
import com.eastfair.pay.enumeration.TransactionOrderOrderTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 实体类
 * 交易订单
 * </p>
 *
 * @author fwl
 * @since 2023-03-08
 */
@Data
@ApiModel(value = "TransactionOrderDTO", description = "交易订单")
public class TransactionOrderDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    private Long tenantId;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 255, message = "展会名称长度不能超过255")
    private String exhibitionName;

    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    private Long exhibitionId;

    /**
     * 业务类型(订单，结算单)
     */
    @ApiModelProperty(value = "业务类型:#{CONTRACT:合同;SERVICE:服务;CERTIFICATE:证件;WORKEXTRA:加班;FINE:罚款;BOND:保证金;EXHIBITION:展览;MEETING:会议;FOOD:餐饮}")
    private TransactionOrderOrderTypeEnum orderType;
    /**
     * 订单名称
     */
    @ApiModelProperty(value = "订单名称")
    @Size(max = 255, message = "订单名称长度不能超过255")
    private String orderName;

    /**
     * 单号
     */
    @ApiModelProperty(value = "单号")
    @Size(max = 255, message = "单号长度不能超过255")
    private String orderNum;

    /**
     * 单额
     */
    @ApiModelProperty(value = "单额")
    private BigDecimal orderAmount;

    /**
     * 订单时间
     */
    @ApiModelProperty(value = "订单时间")
    private LocalDateTime orderTime;
    /**
     * 订单状态
     */
    @ApiModelProperty(value = "订单状态:#{PAYING:支付中;UNPAY:未付款;PAYED:已付款;PARTPAY:部分分款;REFUNDING:退款中;REFUNDED:已退款;CANCEL:取消")
    private TransactionOrderOrderStatusEnum orderStatus;

    /**
     * 付款方
     */
    @ApiModelProperty(value = "付款方")
    @Size(max = 255, message = "付款方长度不能超过255")
    private String payer;

    /**
     * 付款计划
     */
    @ApiModelProperty(value = "付款计划")
    @Size(max = 255, message = "付款计划长度不能超过255")
    private List<OrderPaymentPlan> paymentPlan;
    /**
     * 付款期数
     */
    @ApiModelProperty(value = "付款期数")
    private Integer paymentPeriods;

    /**
     * 收款单位
     */
    @ApiModelProperty(value = "收款单位")
    @Size(max = 255, message = "收款单位长度不能超过255")
    private String payee;

    /**
     * 制单流水号
     */
    @ApiModelProperty(value = "制单流水号")
    private String mainno;

    /**
     * 支付方式
     * {@link com.eastfair.pay.enums.PayTypeEnum}
     */
    @ApiModelProperty(value = "支付方式")
    private String payType;
    /**
     * 商户系统标识
     */
    @ApiModelProperty(value = "商户系统标识")
    private String systemCode;
    /**
     * 商户系统名称
     */
    @ApiModelProperty(value = "商户系统名称")
    private String systemName;
    /**
     * 支付系统单号
     */
    @ApiModelProperty(value = "支付系统单号")
    private String payOrderNo;


    /**
     * 支付渠道
     */
    @ApiModelProperty(value = "支付渠道")
    private String payChannel;
}
